package com.situ.cart.spi.model;

import com.baomidou.mybatisplus.annotation.*;
import com.mall.model.Product;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("cart")
public class CartItem {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer userId;//会员id
    private Integer productId;//商品id
    @TableField(whereStrategy = FieldStrategy.NEVER)
    private Integer quantity;//数量

    private LocalDateTime createdTime;
    private LocalDateTime updatedTime;
    @TableField(exist = false)
    private Product product;//商品，如果系统中有sku表，则关联sku实体
}
